﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Game
{
    public abstract class Moveable : Entity
    {
        private Body mBody;

        public Moveable(Body body) : base()
        {
            mBody = body;
        }

        public Body Body
        {
            get { return mBody; }
        }

        public override void Invalidate()
        {
            Body.SetPosition(Body.SceneNode.GetTransformation().GetWorldPosition());
        }

        public override void OnUpdate(Events.ProcessSceneUpdate evnt) 
        {
            Body.OnUpdate(evnt);
        }
    }
}
